home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94b.txt / 000122_icon-group-sender _Thu Nov 24 02:35:53 1994.msg < prev    next >
Internet Message Format  |  1995-02-09  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Wed, 23 Nov 1994 20:12:59 MST
  2. To: icon-group-l@cs.arizona.edu
  3. Date: Thu, 24 Nov 1994 02:35:53 GMT
  4. From: dsh@netcom.com (David S. Harrison)
  5. Message-Id: <dshCzr37t.18K@netcom.com>
  6. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  7. Sender: icon-group-request@cs.arizona.edu
  8. Subject: proc() in Icon 9.0 on SGI
  9. Errors-To: icon-group-errors@cs.arizona.edu
  10.  
  11. I was recently trying to use ibpag2 using Icon 9.0 on an SGI
  12. machine.  It seems ibpag2 uses proc() to call the actions
  13. associated with rules.  However, under 9.0 on an SGI, proc()
  14. fails to find procedures.  Below is an example:
  15.  
  16.  
  17. procedure user_func(a)
  18.     return a-7
  19. end
  20.  
  21. procedure main()
  22.     if p := proc("user_func") then {
  23.         write("found it")
  24.         t := p(7)
  25.         write("result value: ", t)
  26.     } else {
  27.         write("didn't find it")
  28.     }
  29. end
  30.  
  31. This program always produces "didn't find it".  I note that if
  32. the function is built in, proc finds it (i.e., repl, or match, etc.).
  33. Perhaps the semantics of proc() have changed since ibpag2 was written.
  34. Has proc() changed since 8.10 or is this a bug in 9.0?
  35.  
  36.             David Harrison
  37.             (dsh@netcom.com)
  38.